{% extends 'organization/org_base.html' %}
{% block title %}<title>教师列表 - Frost</title>{% endblock %}
{% block page_path %}机构讲师{% endblock %}
{% block right_form %}
<div class="right companycenter layout">
    <div class="head">
        <h1>机构讲师</h1>
    </div>
    <div class="messagelist">
        <div class=" butler_list butler-fav-box">
            {% for teacher in page_teachers.object_list %}
            <dl class="des users">
                <dt>
                    <a href="{% url 'organization:teacher_detail' teacher.id %}">
                        <img width="100" height="100" class="scrollLoading"
                             data-url="{{ MEDIA_URL }}{{ teacher.image }}"
                             src="{{ MEDIA_URL }}{{ teacher.image }}"/>
                    </a>
                </dt>
                <dd>
                    <h1>
                        <a href="{% url 'organization:teacher_detail' teacher.id %}">
                            {{ teacher.name }}
                        </a>
                    </h1>
                    <ul class="cont clearfix">
                        <li class="time">工作年限：<span>{{ teacher.work_years }}年</span></li>
                        <li class="c7">课程数：<span>{{ teacher.course_set.count }}</span></li>
                    </ul>
                </dd>
            </dl>
            {% endfor %}
        </div>
    </div>
    <div class="pageturn">
        <ul class="pagelist">
            {% if page_teachers.has_previous %}
            <li class="long"><a href="?{{ page_teachers.previous_page_number.querystring }}">上一页</a></li>
            {% endif %}
            {% for page in page_teachers.pages %}
            {% if page %}
            {% ifequal page page_teachers.number %}
            <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>
            {% else %}
            <li><a href="?{{ page.querystring }}">{{ page }}</a></li>
            {% endifequal %}
            {% else %}
            <li class="none">...</li>
            {% endif %}
            {% endfor %}
            {% if page_teachers.has_next %}
            <li class="long"><a href="?{{ page_teachers.next_page_number.querystring }}">下一页</a></li>
            {% endif %}
        </ul>
    </div>
</div>
{% endblock %}
